package app;
import java.util.Comparator;

public class JourneyFeeComparator implements Comparator<Journey>{
	
	public int compare(Journey o1,Journey o2) {
		double journeyFee1 = o1.getCost();
		double journeyFee2 = o2.getCost();
		int index = 0;
		if (journeyFee1 > journeyFee2)
			index = -1;
		else if (journeyFee1 == journeyFee2)
			index =  0;
		else if(journeyFee1 < journeyFee2)
			index =  1;
		return index;
		
	}	
}
